<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let ary =[{
            id:1,
            name:'张三'
        },{
            id:2,
            name:'李四'
        }];
        let target = ary.find((item,index) =>item.id ==1);
        let target1 = console.log(target);
    </script>
</body>
</html>